<?php

namespace app\api\controller;

use app\common\controller\Api;

/**
 * 首页接口
 */
class Index extends Api
{
    protected $noNeedLogin = ['*'];
    protected $noNeedRight = ['*'];

    /**
     * 首页
     *
     */
    public function index()
    {
        $this->success('请求成功');
    }

    public function banner()
    {
        $data = Db('banner')->where(['status'=>'normal'])->order('id desc')->find();
        if($data){
            $this->success('返回成功', $data);
        }else{
            $this->error('没有数据');
        }

    }

    public function wxapi()
    {
        $appId = config('site.appid');
        $timestamp = time();
    }
}
